
clear all
use "YoungEB.dta"
 
 set scheme s1mono, permanent

rename iw_lang cntry  

replace cntry = "BE" if cntry == "BV"
replace cntry = "BE" if cntry == "BF"
replace cntry = "GB" if cntry == ""
drop if cntry==""


g yrbrn= year-d2
drop if d2<19

drop if yrbrn<1973
drop if  yrbrn>1998
 

 
 g Bologna=0
 
 * Replace treatment for specific countries and cohorts
replace Bologna = 1 if cntry == "AL" & yrbrn >= 1986
replace Bologna = 1 if cntry == "AT" & yrbrn >= 1981
replace Bologna = 1 if cntry == "BE" & yrbrn >= 1986
replace Bologna = 1 if cntry == "HR" & yrbrn >= 1986
replace Bologna = 1 if cntry == "CZ" & yrbrn >= 1981
replace Bologna = 1 if cntry == "DK" & yrbrn >= 1981
replace Bologna = 1 if cntry == "EE" & yrbrn >= 1983
replace Bologna = 1 if cntry == "FI" & yrbrn >= 1985
replace Bologna = 1 if cntry == "FR" & yrbrn >= 1988
replace Bologna = 1 if cntry == "DE" & yrbrn >= 1983
replace Bologna = 1 if cntry == "HU" & yrbrn >= 1986
replace Bologna = 1 if cntry == "IT" & yrbrn >= 1982
replace Bologna = 1 if cntry == "LV" & yrbrn >= 1982
replace Bologna = 1 if cntry == "LT" & yrbrn >= 1981
replace Bologna = 1 if cntry == "LU" & yrbrn >= 1986
replace Bologna = 1 if cntry == "NL" & yrbrn >= 1984
replace Bologna = 1 if cntry == "PL" & yrbrn >= 1987
replace Bologna = 1 if cntry == "PT" & yrbrn >= 1987
replace Bologna = 1 if cntry == "SK" & yrbrn >= 1985
replace Bologna = 1 if cntry == "SI" & yrbrn >= 1985
replace Bologna = 1 if cntry == "ES" & yrbrn >= 1987
replace Bologna = 1 if cntry == "SE" & yrbrn >= 1988
replace Bologna = 1 if cntry == "NO" & yrbrn >= 1983
replace Bologna = 1 if cntry == "CH" & yrbrn >= 1985
drop if cntry=="CH"
 
 
 keep if d3_r>3
 drop if d3_r==9
 
g uni=0
 replace uni=1 if q13==1
 
g state=0
 replace state=1 if q13==2
 
g  social=0
 replace social=1 if q13==4 | q13==3
 
g service =social
 
g  company=0
replace company=1 if q13==5

g other=0
replace other=1 if q13==6
 

 
  
collapse (mean)  other  uni company social state , by(Bologna)
 
  
la var uni "University"
la var company "Companies"
la var social "Social service"
la var state "State"
la var other "Others"
 
g Job_where=0 if uni==1
replace Job_where=1 if company==1
replace Job_where=2 if state==1 | social==1

la def tt 0 "Pre-Bologna students" 1 "Post-Bologna students" 
la val Bologna tt
 
 
 grstyle init
 grstyle set legend 2,  nobox
 grstyle set size 8pt: tick_label key_label
 grstyle set size 12pt: heading
 grstyle set size 10pt: subheading axis_title
* grstyle set color Reds, n(5) reverse  gscale(.5) 
 grstyle set intensity 66: bar
 grstyle set graphsize  10cm 14cm 
graph bar  uni company state social other, over(Bologna, label(labsize(medium)) gap(*2))    legend(position(12) row(1)  symxsize(*0.65) size(*1.2) label(1 "University") label(2 "Companies") label(3 "State")  label(4 "Social services") label(5 "Others")) ylabel(0 0.1 0.2 0.3 0.4 0.5)   title("{bf:(a) Students: pre/post Bologna}", size(vlarge))  subtitle("{bf:What is the best support for you to find a job?}", size(medium))   ytitle("Average score", size(medium)) yscale(titlegap(*5))  bar(1, lwidth(thick) lcolor(black) fcolor(white)) bar(2, lwidth(thick)lcolor(gs6) fcolor(white))  bar(3, lwidth(thick)lcolor(gs9) fcolor(white)) bar(4, lwidth(thick)lcolor(gs12) fcolor(white)) bar(5, lwidth(thick)lcolor(gs15) fcolor(white))    bargap(-50)
graph export "Figure2a.png", replace  
